home *** CD-ROM | disk | FTP | other *** search
- unit ColorBtn;
-
- interface
-
- uses
- SysUtils, WinTypes, WinProcs, Messages, Classes, Graphics, Controls,
- Forms, Dialogs, StdCtrls, GraphBtn;
-
- type
- TColoredButton = class(TGraphicButton)
- private
- FBoldText : Boolean;
- FAlignment: TAlignment;
-
- procedure SetAlignment(AValue : TAlignment);
-
- protected
- function CalcTextBounds(const ARect : TRect): TRect;
- procedure DrawBtnFace(IsDown, IsDefault, IsFocused, IsNewStyle : Boolean;
- const ARect : TRect); override;
- function DrawCaption(const ARect : TRect): TRect; virtual;
-
- public
- constructor Create(AOwner : TComponent); override;
-
- published
- property ColorFace;
- property ColorShadow;
- property ColorHiLight;
- property BoldFocus : Boolean read FBoldText write FBoldText default True;
- property Alignment : TAlignment read FAlignment write SetAlignment default taCenter;
- end;
-
- implementation
- end.